Setting up angularjs and chartjs in Moodle 3.X post
I was wondering how can I integrate angularjs to my moodle plugin. Moodle isn't designed as frontend/backend, so how can I integrate angularjs with smashing moodle? I create a POOC, let's checkout that:
Create a custom template page : the custom template will be only used to put
ng-app
directiveLoad all javascript in the template page
Write PHP AJAX or Moodle Webservice to expose data: In my case, I didn't care about exposing webservices so I choose to write a simple ajax page.
Write your angularjs code
Enjoy angularjs on moodle ! In this cas, we will use this to generate beautiful reports with Charts.js